define(['angular'], function(angular) {
    var filter = angular.module('app.filter', []);

    filter.filter('keyword', function() {
        return function(input, keyword, color) {
            input = input || '';
            keyword = keyword || '';
            color = color || 'red';
            return input.replace(new RegExp(keyword, 'g'), function() {
                return '<font color="' + color + '">' + keyword + '</font>';
            });
        }
    });

    return filter;
});
